/**
*@Author:zt
*@Description: 角色管理相关接口
*@Date 2024-08-14
*/
import request from '@/http'

// 分页列表查询
export const page = async (data: object) => {
  return await request.post({
    url: '/authority/sysTRole/page',
    data: data
  })
}

// 扩展查询
export const rolePage = async (data: object) => {
    return await request.post({
      url: '/authority/sysTRole/rolePage',
      data: data
    })
  }

// 新增
export const add = async (data: object) => {
  return await request.post({
    url: '/authority/sysTRole',
    data: data
  })
}

// 修改
export const update = async (data: object) => {
  return await request.post({
    url: '/authority/sysTRole/update',
    data: data
  })
}

// 删除
export const del = async (data: any) => {
  return await request.post({
    url: '/authority/sysTRole/delete',
    data,
    headersType: 'application/x-www-form-urlencoded'
  })
}

  // 批量查询
export const query = async (data: any) => {
  return await request.post({
    url: '/authority/sysTRole/query' ,
    data: data,
  })
}
  // 查询单个数据
export const singleQuery = async (data: any) => {
    return await request.get({
      url: '/authority/sysTRole/'+data
    })
  }

// 单体查询
export const download = async (data: any) => {
  return await request.download1({
    url: '/authority/sysTUser/export',
    data
  })
}
// 根据角色类型分组查询角色信息
export const roleGroup = async () => {
    return await request.get({
      url: '/authority/sysTRole/roleGroup'
    })
  }
